//
//  UILabel+WJLabelInit.m
//  rrqs
//
//  Created by 杜文杰 on 2018/8/30.
//

#import "UILabel+WJLabelInit.h"

@implementation UILabel (WJLabelInit)

+ (UILabel *)backLabelWithAlignment:(NSString *)typeStr contentStr:(NSString *)contentStr bgcolor:(NSString *)colorStr fontSize:(UIFont *)fontsize
{
    UILabel *dateLabel = [[UILabel alloc]init];
    dateLabel.backgroundColor = getColor(colorStr);
    dateLabel.font = fontsize;
    if ([typeStr isEqualToString:@"1"]) {
        dateLabel.textAlignment = NSTextAlignmentLeft;
    }else if ([typeStr isEqualToString:@"2"]){
        dateLabel.textAlignment = NSTextAlignmentRight;
    }
    dateLabel.text = contentStr;
    return dateLabel;
}
@end
